<?php
/**
 * @author Artur Bier <izatop@gmail.com>
 * @package Model.Exception
 *
 * @copyright TinyWEB CMS
 * @link http://tinywebcms.ru
 * @link http://cms.vingrad.ru
 * @version SVN: $Id$ 
 */
 
 /**
  * ModelRollbackException
  */
class ModelRollbackException extends Exception  
{
    /**
     * Parent exception
     *
     * @var Exception
     */
    private $parent = null;
    
    /**
     * Конструктор класса
     *
     * @param Exception $instance
     * @param Model $model
     */
    public function __construct(Exception $instance, Model $model)
    {
        parent::__construct($instance->getMessage(), $instance->getCode());
        $model->rollback();
    }
}

?>